<?php
class Product_helper {
    
    public function show_product($data = array())
    {
        $baseURL = base_url();
        $html = '';
        foreach($data as $product)
        {
        $html .= '<div class="product">
                        <a href="'.$baseURL.'default/product/details/'.$product['pro_id'].'#cate" title='.$product['pro_info'].'">
                                <span class="title">'.$product['pro_name'].'</span>
                                <img src='.$product['pro_img_src'].' alt="Images" height="150" width="180"/>
                                <span class="number">Price: <del> $'.$product['pro_price'].'</del></span>
                                <span class="price"><span>Sale: </span>$'.$product['pro_sale'].'</span>

                        </a>
                    <div class="link">
                        <a href="'.$baseURL.'default/product/details/'.$product['pro_id'].'#cate">Details</a> -- <a href="'.$baseURL.'default/shopping_cart/buy/'.$product['pro_id'].'#cate" class="buy">BUY NOW</a>
                    </div>
                </div>';
        }
        return $html;
    }
    public function show_comment($data = array())
    {
        $baseURL = base_url();
        $html = '';
        
        $html .= '<img src="'.$baseURL.'publics/home/images/comment.png" width="30" height="30">
                  <b>'.$data['cus_name'].'</b>
                  <p style="border-bottom: 1px dotted #FFF; padding-bottom: 5px;">'.$data['comment'].'</p>';
        
        return $html;
    }
}
